﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Resources;
using System.Reflection;

namespace Shsc.Net.FrameWork.Common.Util
{
    public class MessageUtil
    {
        public static string GetSingleMessage(string msgId, params string[] msgParams)
        {
            ResourceManager manage = new ResourceManager("Shsc.Net.FrameWork.Common.Resource.ExceptionMessageResource", Assembly.GetExecutingAssembly());
            string msg = manage.GetString(msgId);
            if (msgParams == null || msgParams.Length == 0)
            {
                return msg;
            } 
            return string.Format(msg, msgParams);
        }
    }
}
